<?php $this->_extends('../_layouts/blank_layout'); ?>

<?php $this->_block('contents'); ?>

<div id="getting-started">
<?php
// user_id, group_id, account, user_name, password, ipzone, email, mobile, phone, join_day, dimission_day, birthday,
// created, updated, is_locked, register_ip, last_login, last_login_ip, login_count
// group_id, parent_id, group_name, left_value, right_value, description, has_users
// role_id rolename description user_owned group_owned
//$show_box['user_info']
$user_roles = Helper_MtoM::MaekAasArr($show_box['user_info']->roles,'admin::users/bind',array('user_id'=>$show_box['user_info']['user_id']),'rolename');
$user_roles = implode(',', Q::normalize($user_roles));
?>

<ul class="infolisti">
    <li>编　　号：<?php echo $show_box['user_info']['user_id'];?></li>
    <li>姓　　名：<?php echo $show_box['user_info']['user_name'];?></li>
    <li>登录帐号：<?php echo $show_box['user_info']['account'];?></li>
    <li>所 在 组：<?php echo $show_box['user_info']->group->group_name;?></li>
    <li style="display:none">拥有角色</li>
    <li style="display:none">是否锁定<?php echo $show_box['user_info']['is_locked']?'已锁定':'未锁定';?></li>
	<li>可管理主机<div><ul><?php 
	
	$asg=Groupuser::find('userid = ?',$show_box['user_info']['user_id'])->getAll();

	foreach ($asg as $value)
    {
		echo '<li><a href="'.url('default::default/framework', array('id' => $value->groupid,'control' => 'hostmanage','acts' => 'hostlist|search')).'">'.$value->groups->groupname.'</a></li>';
		//echo ;
	}

	//$allgs);

	?></ul></div></li>
</ul>
</div>

<?php //$this->_element('../../_elements/formview_simple', array('form' => $show_box['form'])); ?>
<?php //dump($show_box['user_roles']);?>
<?php //dump($show_box['roles']);?>

<?php $this->_endblock(); ?>